From: Jordi Mallach Date: Thu, 8 Jan 2026 21:38:56 +0000 (+0100) Subject: Several FTBFS fixes for Hurd systems. X-Git-Tag: archive/raspbian/0.284+dfsg1-1+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=b53b418d6734d655afd9c79311d2b49f09b335bb;p=mame.git Several FTBFS fixes for Hurd systems. Forwarded: no Gbp-Pq: Name hurd.patch --- diff --git a/makefile b/makefile index f7976e809..bbb608359 100644 --- a/makefile +++ b/makefile @@ -229,6 +229,8 @@ GENIEOS := bsd else ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD) OS := freebsd GENIEOS := freebsd +else ifeq ($(firstword $(filter GNU,$(UNAME))),GNU) +OS := gnu else ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD) OS := netbsd GENIEOS := freebsd @@ -1296,6 +1298,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) +.PHONY: gnu_x86 +gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 + +.PHONY: gnu +gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile + $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) + #------------------------------------------------- # gmake-linux-clang #------------------------------------------------- diff --git a/scripts/genie.lua b/scripts/genie.lua index 9cb7ee2a4..fa6e98dfc 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -150,6 +150,7 @@ newoption { { "netbsd", "NetBSD" }, { "openbsd", "OpenBSD" }, { "linux", "Linux" }, + { "gnu", "GNU" }, { "macosx", "OSX" }, { "windows", "Windows" }, { "haiku", "Haiku" }, diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 86a727213..d4ae1a2ce 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -219,6 +219,9 @@ if _OPTIONS["targetos"]=="windows" then SDLOS_TARGETOS = "win32" elseif _OPTIONS["targetos"]=="macosx" then SDLOS_TARGETOS = "macosx" +elseif _OPTIONS["targetos"]=="gnu" then + SDL_NETWORK = "taptun" + SYNC_IMPLEMENTATION = "tc" end if BASE_TARGETOS=="unix" then diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp index f5dc2e91f..533fa8712 100644 --- a/src/osd/modules/file/posixfile.cpp +++ b/src/osd/modules/file/posixfile.cpp @@ -42,6 +42,12 @@ #define _DARWIN_C_SOURCE #endif +#if defined(__GNU__) +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif + // MAME headers #include "posixfile.h" #include "osdcore.h" diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp index fa1204547..3299eb4d2 100644 --- a/src/osd/modules/file/posixptty.cpp +++ b/src/osd/modules/file/posixptty.cpp @@ -27,6 +27,9 @@ #include #elif defined(__linux__) || defined(__EMSCRIPTEN__) #include +#elif defined(__GNU__) +#include +#include #elif defined(__HAIKU__) #include #elif defined(__sun) @@ -35,6 +38,11 @@ #include #endif +#if defined(__GNU__) +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif namespace { diff --git a/src/osd/sdl/sdlprefix.h b/src/osd/sdl/sdlprefix.h index 0678b3ddb..5303c867b 100644 --- a/src/osd/sdl/sdlprefix.h +++ b/src/osd/sdl/sdlprefix.h @@ -40,7 +40,7 @@ /* Large file support on IRIX needs _SGI_SOURCE */ #undef _POSIX_SOURCE -#elif defined(__linux__) || defined(__FreeBSD_kernel__) +#elif defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__) #define SDLMAME_LINUX 1 #elif defined(__FreeBSD__)